<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - id:000977,sync:fuzzer2,src:001052.lcov_info_final - test/node/node_test.cpp</title>
  <link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">test/node</a> - node_test.cpp<span style="font-size: 80%;"> (source / <a href="node_test.cpp.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">id:000977,sync:fuzzer2,src:001052.lcov_info_final</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">366</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2016-03-13 10:42:47</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">166</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : #include &quot;yaml-cpp/emitter.h&quot;</a>
<span class="lineNum">       2 </span>            : #include &quot;yaml-cpp/node/emit.h&quot;
<span class="lineNum">       3 </span>            : #include &quot;yaml-cpp/node/node.h&quot;
<span class="lineNum">       4 </span>            : #include &quot;yaml-cpp/node/impl.h&quot;
<span class="lineNum">       5 </span>            : #include &quot;yaml-cpp/node/convert.h&quot;
<span class="lineNum">       6 </span>            : #include &quot;yaml-cpp/node/iterator.h&quot;
<span class="lineNum">       7 </span>            : #include &quot;yaml-cpp/node/detail/impl.h&quot;
<span class="lineNum">       8 </span>            : 
<span class="lineNum">       9 </span>            : #include &quot;gmock/gmock.h&quot;
<span class="lineNum">      10 </span>            : #include &quot;gtest/gtest.h&quot;
<span class="lineNum">      11 </span>            : 
<span class="lineNum">      12 </span>            : using ::testing::AnyOf;
<span class="lineNum">      13 </span>            : using ::testing::Eq;
<span class="lineNum">      14 </span>            : 
<a name="15"><span class="lineNum">      15 </span>            : namespace YAML {</a>
<span class="lineNum">      16 </span>            : namespace {
<span class="lineNum">      17 </span><span class="lineNoCov">          0 : TEST(NodeTest, SimpleScalar) {</span>
<span class="lineNum">      18 </span><span class="lineNoCov">          0 :   Node node = Node(&quot;Hello, World!&quot;);</span>
<span class="lineNum">      19 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsScalar());</span>
<span class="lineNum">      20 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;Hello, World!&quot;, node.as&lt;std::string&gt;());</span>
<a name="21"><span class="lineNum">      21 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      22 </span>            : 
<span class="lineNum">      23 </span><span class="lineNoCov">          0 : TEST(NodeTest, IntScalar) {</span>
<span class="lineNum">      24 </span><span class="lineNoCov">          0 :   Node node = Node(15);</span>
<span class="lineNum">      25 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsScalar());</span>
<span class="lineNum">      26 </span><span class="lineNoCov">          0 :   EXPECT_EQ(15, node.as&lt;int&gt;());</span>
<a name="27"><span class="lineNum">      27 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      28 </span>            : 
<span class="lineNum">      29 </span><span class="lineNoCov">          0 : TEST(NodeTest, SimpleAppendSequence) {</span>
<span class="lineNum">      30 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">      31 </span><span class="lineNoCov">          0 :   node.push_back(10);</span>
<span class="lineNum">      32 </span><span class="lineNoCov">          0 :   node.push_back(&quot;foo&quot;);</span>
<span class="lineNum">      33 </span><span class="lineNoCov">          0 :   node.push_back(&quot;monkey&quot;);</span>
<span class="lineNum">      34 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsSequence());</span>
<span class="lineNum">      35 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, node.size());</span>
<span class="lineNum">      36 </span><span class="lineNoCov">          0 :   EXPECT_EQ(10, node[0].as&lt;int&gt;());</span>
<span class="lineNum">      37 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, node[1].as&lt;std::string&gt;());</span>
<span class="lineNum">      38 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;monkey&quot;, node[2].as&lt;std::string&gt;());</span>
<span class="lineNum">      39 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsSequence());</span>
<a name="40"><span class="lineNum">      40 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      41 </span>            : 
<span class="lineNum">      42 </span><span class="lineNoCov">          0 : TEST(NodeTest, MapElementRemoval) {</span>
<span class="lineNum">      43 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">      44 </span><span class="lineNoCov">          0 :   node[&quot;foo&quot;] = &quot;bar&quot;;</span>
<span class="lineNum">      45 </span><span class="lineNoCov">          0 :   node.remove(&quot;foo&quot;);</span>
<span class="lineNum">      46 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(!node[&quot;foo&quot;]);</span>
<a name="47"><span class="lineNum">      47 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      48 </span>            : 
<span class="lineNum">      49 </span><span class="lineNoCov">          0 : TEST(NodeTest, SimpleAssignSequence) {</span>
<span class="lineNum">      50 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">      51 </span><span class="lineNoCov">          0 :   node[0] = 10;</span>
<span class="lineNum">      52 </span><span class="lineNoCov">          0 :   node[1] = &quot;foo&quot;;</span>
<span class="lineNum">      53 </span><span class="lineNoCov">          0 :   node[2] = &quot;monkey&quot;;</span>
<span class="lineNum">      54 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsSequence());</span>
<span class="lineNum">      55 </span><span class="lineNoCov">          0 :   EXPECT_EQ(3, node.size());</span>
<span class="lineNum">      56 </span><span class="lineNoCov">          0 :   EXPECT_EQ(10, node[0].as&lt;int&gt;());</span>
<span class="lineNum">      57 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, node[1].as&lt;std::string&gt;());</span>
<span class="lineNum">      58 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;monkey&quot;, node[2].as&lt;std::string&gt;());</span>
<span class="lineNum">      59 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsSequence());</span>
<a name="60"><span class="lineNum">      60 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      61 </span>            : 
<span class="lineNum">      62 </span><span class="lineNoCov">          0 : TEST(NodeTest, SimpleMap) {</span>
<span class="lineNum">      63 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">      64 </span><span class="lineNoCov">          0 :   node[&quot;key&quot;] = &quot;value&quot;;</span>
<span class="lineNum">      65 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">      66 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;key&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      67 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, node.size());</span>
<a name="68"><span class="lineNum">      68 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      69 </span>            : 
<span class="lineNum">      70 </span><span class="lineNoCov">          0 : TEST(NodeTest, MapWithUndefinedValues) {</span>
<span class="lineNum">      71 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">      72 </span><span class="lineNoCov">          0 :   node[&quot;key&quot;] = &quot;value&quot;;</span>
<span class="lineNum">      73 </span><span class="lineNoCov">          0 :   node[&quot;undefined&quot;];</span>
<span class="lineNum">      74 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">      75 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;key&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      76 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, node.size());</span>
<span class="lineNum">      77 </span>            : 
<span class="lineNum">      78 </span><span class="lineNoCov">          0 :   node[&quot;undefined&quot;] = &quot;monkey&quot;;</span>
<span class="lineNum">      79 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;monkey&quot;, node[&quot;undefined&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      80 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, node.size());</span>
<a name="81"><span class="lineNum">      81 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">      82 </span>            : 
<span class="lineNum">      83 </span><span class="lineNoCov">          0 : TEST(NodeTest, MapForceInsert) {</span>
<span class="lineNum">      84 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">      85 </span><span class="lineNoCov">          0 :   Node k1(&quot;k1&quot;);</span>
<span class="lineNum">      86 </span><span class="lineNoCov">          0 :   Node k2(&quot;k2&quot;);</span>
<span class="lineNum">      87 </span><span class="lineNoCov">          0 :   Node v1(&quot;v1&quot;);</span>
<span class="lineNum">      88 </span><span class="lineNoCov">          0 :   Node v2(&quot;v2&quot;);</span>
<span class="lineNum">      89 </span><span class="lineNoCov">          0 :   node[k1] = v1;</span>
<span class="lineNum">      90 </span><span class="lineNoCov">          0 :   node[k2] = v1;</span>
<span class="lineNum">      91 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">      92 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;v1&quot;, node[&quot;k1&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      93 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;v1&quot;, node[&quot;k2&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      94 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, node.size());</span>
<span class="lineNum">      95 </span>            : 
<span class="lineNum">      96 </span><span class="lineNoCov">          0 :   node.force_insert(k2, v2);</span>
<span class="lineNum">      97 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;v1&quot;, node[&quot;k1&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      98 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;v2&quot;, node[&quot;k2&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">      99 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, node.size());</span>
<a name="100"><span class="lineNum">     100 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     101 </span>            : 
<span class="lineNum">     102 </span><span class="lineNoCov">          0 : TEST(NodeTest, UndefinedConstNodeWithFallback) {</span>
<span class="lineNum">     103 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     104 </span><span class="lineNoCov">          0 :   const Node&amp; cn = node;</span>
<span class="lineNum">     105 </span><span class="lineNoCov">          0 :   EXPECT_EQ(cn[&quot;undefined&quot;].as&lt;int&gt;(3), 3);</span>
<a name="106"><span class="lineNum">     106 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     107 </span>            : 
<span class="lineNum">     108 </span><span class="lineNoCov">          0 : TEST(NodeTest, MapIteratorWithUndefinedValues) {</span>
<span class="lineNum">     109 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     110 </span><span class="lineNoCov">          0 :   node[&quot;key&quot;] = &quot;value&quot;;</span>
<span class="lineNum">     111 </span><span class="lineNoCov">          0 :   node[&quot;undefined&quot;];</span>
<span class="lineNum">     112 </span>            : 
<span class="lineNum">     113 </span><span class="lineNoCov">          0 :   std::size_t count = 0;</span>
<span class="lineNum">     114 </span><span class="lineNoCov">          0 :   for (const_iterator it = node.begin(); it != node.end(); ++it)</span>
<span class="lineNum">     115 </span><span class="lineNoCov">          0 :     count++;</span>
<span class="lineNum">     116 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, count);</span>
<a name="117"><span class="lineNum">     117 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     118 </span>            : 
<span class="lineNum">     119 </span><span class="lineNoCov">          0 : TEST(NodeTest, ConstIteratorOnConstUndefinedNode) {</span>
<span class="lineNum">     120 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     121 </span><span class="lineNoCov">          0 :   const Node&amp; cn = node;</span>
<span class="lineNum">     122 </span><span class="lineNoCov">          0 :   const Node&amp; undefinedCn = cn[&quot;undefined&quot;];</span>
<span class="lineNum">     123 </span>            : 
<span class="lineNum">     124 </span><span class="lineNoCov">          0 :   std::size_t count = 0;</span>
<span class="lineNum">     125 </span><span class="lineNoCov">          0 :   for (const_iterator it = undefinedCn.begin(); it != undefinedCn.end(); ++it) {</span>
<span class="lineNum">     126 </span><span class="lineNoCov">          0 :     count++;</span>
<span class="lineNum">     127 </span>            :  }
<span class="lineNum">     128 </span><span class="lineNoCov">          0 :   EXPECT_EQ(0, count);</span>
<a name="129"><span class="lineNum">     129 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     130 </span>            : 
<span class="lineNum">     131 </span><span class="lineNoCov">          0 : TEST(NodeTest, IteratorOnConstUndefinedNode) {</span>
<span class="lineNum">     132 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     133 </span><span class="lineNoCov">          0 :   const Node&amp; cn = node;</span>
<span class="lineNum">     134 </span><span class="lineNoCov">          0 :   const Node&amp; undefinedCn = cn[&quot;undefined&quot;];</span>
<span class="lineNum">     135 </span>            : 
<span class="lineNum">     136 </span><span class="lineNoCov">          0 :   Node&amp; nonConstUndefinedNode = const_cast&lt;Node&amp;&gt;(undefinedCn);</span>
<span class="lineNum">     137 </span>            : 
<span class="lineNum">     138 </span><span class="lineNoCov">          0 :   std::size_t count = 0;</span>
<span class="lineNum">     139 </span><span class="lineNoCov">          0 :   for (iterator it = nonConstUndefinedNode.begin(); it != nonConstUndefinedNode.end(); ++it) {</span>
<span class="lineNum">     140 </span><span class="lineNoCov">          0 :     count++;</span>
<span class="lineNum">     141 </span>            :   }
<span class="lineNum">     142 </span><span class="lineNoCov">          0 :   EXPECT_EQ(0, count);</span>
<a name="143"><span class="lineNum">     143 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     144 </span>            : 
<span class="lineNum">     145 </span><span class="lineNoCov">          0 : TEST(NodeTest, SimpleSubkeys) {</span>
<span class="lineNum">     146 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     147 </span><span class="lineNoCov">          0 :   node[&quot;device&quot;][&quot;udid&quot;] = &quot;12345&quot;;</span>
<span class="lineNum">     148 </span><span class="lineNoCov">          0 :   node[&quot;device&quot;][&quot;name&quot;] = &quot;iPhone&quot;;</span>
<span class="lineNum">     149 </span><span class="lineNoCov">          0 :   node[&quot;device&quot;][&quot;os&quot;] = &quot;4.0&quot;;</span>
<span class="lineNum">     150 </span><span class="lineNoCov">          0 :   node[&quot;username&quot;] = &quot;monkey&quot;;</span>
<span class="lineNum">     151 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;12345&quot;, node[&quot;device&quot;][&quot;udid&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     152 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;iPhone&quot;, node[&quot;device&quot;][&quot;name&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     153 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;4.0&quot;, node[&quot;device&quot;][&quot;os&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     154 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;monkey&quot;, node[&quot;username&quot;].as&lt;std::string&gt;());</span>
<a name="155"><span class="lineNum">     155 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     156 </span>            : 
<span class="lineNum">     157 </span><span class="lineNoCov">          0 : TEST(NodeTest, StdVector) {</span>
<span class="lineNum">     158 </span><span class="lineNoCov">          0 :   std::vector&lt;int&gt; primes;</span>
<span class="lineNum">     159 </span><span class="lineNoCov">          0 :   primes.push_back(2);</span>
<span class="lineNum">     160 </span><span class="lineNoCov">          0 :   primes.push_back(3);</span>
<span class="lineNum">     161 </span><span class="lineNoCov">          0 :   primes.push_back(5);</span>
<span class="lineNum">     162 </span><span class="lineNoCov">          0 :   primes.push_back(7);</span>
<span class="lineNum">     163 </span><span class="lineNoCov">          0 :   primes.push_back(11);</span>
<span class="lineNum">     164 </span><span class="lineNoCov">          0 :   primes.push_back(13);</span>
<span class="lineNum">     165 </span>            : 
<span class="lineNum">     166 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     167 </span><span class="lineNoCov">          0 :   node[&quot;primes&quot;] = primes;</span>
<span class="lineNum">     168 </span><span class="lineNoCov">          0 :   EXPECT_EQ(primes, node[&quot;primes&quot;].as&lt;std::vector&lt;int&gt; &gt;());</span>
<a name="169"><span class="lineNum">     169 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     170 </span>            : 
<span class="lineNum">     171 </span><span class="lineNoCov">          0 : TEST(NodeTest, StdList) {</span>
<span class="lineNum">     172 </span><span class="lineNoCov">          0 :   std::list&lt;int&gt; primes;</span>
<span class="lineNum">     173 </span><span class="lineNoCov">          0 :   primes.push_back(2);</span>
<span class="lineNum">     174 </span><span class="lineNoCov">          0 :   primes.push_back(3);</span>
<span class="lineNum">     175 </span><span class="lineNoCov">          0 :   primes.push_back(5);</span>
<span class="lineNum">     176 </span><span class="lineNoCov">          0 :   primes.push_back(7);</span>
<span class="lineNum">     177 </span><span class="lineNoCov">          0 :   primes.push_back(11);</span>
<span class="lineNum">     178 </span><span class="lineNoCov">          0 :   primes.push_back(13);</span>
<span class="lineNum">     179 </span>            : 
<span class="lineNum">     180 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     181 </span><span class="lineNoCov">          0 :   node[&quot;primes&quot;] = primes;</span>
<span class="lineNum">     182 </span><span class="lineNoCov">          0 :   EXPECT_EQ(primes, node[&quot;primes&quot;].as&lt;std::list&lt;int&gt; &gt;());</span>
<a name="183"><span class="lineNum">     183 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     184 </span>            : 
<span class="lineNum">     185 </span><span class="lineNoCov">          0 : TEST(NodeTest, StdMap) {</span>
<span class="lineNum">     186 </span><span class="lineNoCov">          0 :   std::map&lt;int, int&gt; squares;</span>
<span class="lineNum">     187 </span><span class="lineNoCov">          0 :   squares[0] = 0;</span>
<span class="lineNum">     188 </span><span class="lineNoCov">          0 :   squares[1] = 1;</span>
<span class="lineNum">     189 </span><span class="lineNoCov">          0 :   squares[2] = 4;</span>
<span class="lineNum">     190 </span><span class="lineNoCov">          0 :   squares[3] = 9;</span>
<span class="lineNum">     191 </span><span class="lineNoCov">          0 :   squares[4] = 16;</span>
<span class="lineNum">     192 </span>            : 
<span class="lineNum">     193 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     194 </span><span class="lineNoCov">          0 :   node[&quot;squares&quot;] = squares;</span>
<span class="lineNum">     195 </span><span class="lineNoCov">          0 :   std::map&lt;int, int&gt; actualSquares = node[&quot;squares&quot;].as&lt;std::map&lt;int, int&gt; &gt;();</span>
<span class="lineNum">     196 </span><span class="lineNoCov">          0 :   EXPECT_EQ(squares, actualSquares);</span>
<a name="197"><span class="lineNum">     197 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     198 </span>            : 
<span class="lineNum">     199 </span><span class="lineNoCov">          0 : TEST(NodeTest, StdPair) {</span>
<span class="lineNum">     200 </span><span class="lineNoCov">          0 :   std::pair&lt;int, std::string&gt; p;</span>
<span class="lineNum">     201 </span><span class="lineNoCov">          0 :   p.first = 5;</span>
<span class="lineNum">     202 </span><span class="lineNoCov">          0 :   p.second = &quot;five&quot;;</span>
<span class="lineNum">     203 </span>            : 
<span class="lineNum">     204 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     205 </span><span class="lineNoCov">          0 :   node[&quot;pair&quot;] = p;</span>
<span class="lineNum">     206 </span>            :   std::pair&lt;int, std::string&gt; actualP =
<span class="lineNum">     207 </span><span class="lineNoCov">          0 :       node[&quot;pair&quot;].as&lt;std::pair&lt;int, std::string&gt; &gt;();</span>
<span class="lineNum">     208 </span><span class="lineNoCov">          0 :   EXPECT_EQ(p, actualP);</span>
<a name="209"><span class="lineNum">     209 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     210 </span>            : 
<span class="lineNum">     211 </span><span class="lineNoCov">          0 : TEST(NodeTest, SimpleAlias) {</span>
<span class="lineNum">     212 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     213 </span><span class="lineNoCov">          0 :   node[&quot;foo&quot;] = &quot;value&quot;;</span>
<span class="lineNum">     214 </span><span class="lineNoCov">          0 :   node[&quot;bar&quot;] = node[&quot;foo&quot;];</span>
<span class="lineNum">     215 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;foo&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     216 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;bar&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     217 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node[&quot;bar&quot;], node[&quot;foo&quot;]);</span>
<span class="lineNum">     218 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, node.size());</span>
<a name="219"><span class="lineNum">     219 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     220 </span>            : 
<span class="lineNum">     221 </span><span class="lineNoCov">          0 : TEST(NodeTest, AliasAsKey) {</span>
<span class="lineNum">     222 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     223 </span><span class="lineNoCov">          0 :   node[&quot;foo&quot;] = &quot;value&quot;;</span>
<span class="lineNum">     224 </span><span class="lineNoCov">          0 :   Node value = node[&quot;foo&quot;];</span>
<span class="lineNum">     225 </span><span class="lineNoCov">          0 :   node[value] = &quot;foo&quot;;</span>
<span class="lineNum">     226 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;foo&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     227 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, node[value].as&lt;std::string&gt;());</span>
<span class="lineNum">     228 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;foo&quot;, node[&quot;value&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     229 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, node.size());</span>
<a name="230"><span class="lineNum">     230 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     231 </span>            : 
<span class="lineNum">     232 </span><span class="lineNoCov">          0 : TEST(NodeTest, SelfReferenceSequence) {</span>
<span class="lineNum">     233 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     234 </span><span class="lineNoCov">          0 :   node[0] = node;</span>
<span class="lineNum">     235 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsSequence());</span>
<span class="lineNum">     236 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, node.size());</span>
<span class="lineNum">     237 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node, node[0]);</span>
<span class="lineNum">     238 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node, node[0][0]);</span>
<span class="lineNum">     239 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node[0], node[0][0]);</span>
<a name="240"><span class="lineNum">     240 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     241 </span>            : 
<span class="lineNum">     242 </span><span class="lineNoCov">          0 : TEST(NodeTest, ValueSelfReferenceMap) {</span>
<span class="lineNum">     243 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     244 </span><span class="lineNoCov">          0 :   node[&quot;key&quot;] = node;</span>
<span class="lineNum">     245 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">     246 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, node.size());</span>
<span class="lineNum">     247 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node, node[&quot;key&quot;]);</span>
<span class="lineNum">     248 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node, node[&quot;key&quot;][&quot;key&quot;]);</span>
<span class="lineNum">     249 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node[&quot;key&quot;], node[&quot;key&quot;][&quot;key&quot;]);</span>
<a name="250"><span class="lineNum">     250 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     251 </span>            : 
<span class="lineNum">     252 </span><span class="lineNoCov">          0 : TEST(NodeTest, KeySelfReferenceMap) {</span>
<span class="lineNum">     253 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     254 </span><span class="lineNoCov">          0 :   node[node] = &quot;value&quot;;</span>
<span class="lineNum">     255 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">     256 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, node.size());</span>
<span class="lineNum">     257 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[node].as&lt;std::string&gt;());</span>
<a name="258"><span class="lineNum">     258 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     259 </span>            : 
<span class="lineNum">     260 </span><span class="lineNoCov">          0 : TEST(NodeTest, SelfReferenceMap) {</span>
<span class="lineNum">     261 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     262 </span><span class="lineNoCov">          0 :   node[node] = node;</span>
<span class="lineNum">     263 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">     264 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, node.size());</span>
<span class="lineNum">     265 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node, node[node]);</span>
<span class="lineNum">     266 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node, node[node][node]);</span>
<span class="lineNum">     267 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node[node], node[node][node]);</span>
<a name="268"><span class="lineNum">     268 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     269 </span>            : 
<span class="lineNum">     270 </span><span class="lineNoCov">          0 : TEST(NodeTest, TempMapVariable) {</span>
<span class="lineNum">     271 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     272 </span><span class="lineNoCov">          0 :   Node tmp = node[&quot;key&quot;];</span>
<span class="lineNum">     273 </span><span class="lineNoCov">          0 :   tmp = &quot;value&quot;;</span>
<span class="lineNum">     274 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">     275 </span><span class="lineNoCov">          0 :   EXPECT_EQ(1, node.size());</span>
<span class="lineNum">     276 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;key&quot;].as&lt;std::string&gt;());</span>
<a name="277"><span class="lineNum">     277 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     278 </span>            : 
<span class="lineNum">     279 </span><span class="lineNoCov">          0 : TEST(NodeTest, TempMapVariableAlias) {</span>
<span class="lineNum">     280 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     281 </span><span class="lineNoCov">          0 :   Node tmp = node[&quot;key&quot;];</span>
<span class="lineNum">     282 </span><span class="lineNoCov">          0 :   tmp = node[&quot;other&quot;];</span>
<span class="lineNum">     283 </span><span class="lineNoCov">          0 :   node[&quot;other&quot;] = &quot;value&quot;;</span>
<span class="lineNum">     284 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">     285 </span><span class="lineNoCov">          0 :   EXPECT_EQ(2, node.size());</span>
<span class="lineNum">     286 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;key&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     287 </span><span class="lineNoCov">          0 :   EXPECT_EQ(&quot;value&quot;, node[&quot;other&quot;].as&lt;std::string&gt;());</span>
<span class="lineNum">     288 </span><span class="lineNoCov">          0 :   EXPECT_EQ(node[&quot;key&quot;], node[&quot;other&quot;]);</span>
<a name="289"><span class="lineNum">     289 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     290 </span>            : 
<span class="lineNum">     291 </span><span class="lineNoCov">          0 : TEST(NodeTest, Bool) {</span>
<span class="lineNum">     292 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     293 </span><span class="lineNoCov">          0 :   node[true] = false;</span>
<span class="lineNum">     294 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(node.IsMap());</span>
<span class="lineNum">     295 </span><span class="lineNoCov">          0 :   EXPECT_EQ(false, node[true].as&lt;bool&gt;());</span>
<a name="296"><span class="lineNum">     296 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     297 </span>            : 
<span class="lineNum">     298 </span><span class="lineNoCov">          0 : TEST(NodeTest, AutoBoolConversion) {</span>
<span class="lineNum">     299 </span>            : #ifdef _MSC_VER
<span class="lineNum">     300 </span>            : #pragma warning(disable : 4800)
<span class="lineNum">     301 </span>            : #endif
<span class="lineNum">     302 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     303 </span><span class="lineNoCov">          0 :   node[&quot;foo&quot;] = &quot;bar&quot;;</span>
<span class="lineNum">     304 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(static_cast&lt;bool&gt;(node[&quot;foo&quot;]));</span>
<span class="lineNum">     305 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(!node[&quot;monkey&quot;]);</span>
<span class="lineNum">     306 </span><span class="lineNoCov">          0 :   EXPECT_TRUE(!!node[&quot;foo&quot;]);</span>
<a name="307"><span class="lineNum">     307 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     308 </span>            : 
<span class="lineNum">     309 </span><span class="lineNoCov">          0 : TEST(NodeTest, FloatingPrecision) {</span>
<span class="lineNum">     310 </span><span class="lineNoCov">          0 :   const double x = 0.123456789;</span>
<span class="lineNum">     311 </span><span class="lineNoCov">          0 :   Node node = Node(x);</span>
<span class="lineNum">     312 </span><span class="lineNoCov">          0 :   EXPECT_EQ(x, node.as&lt;double&gt;());</span>
<a name="313"><span class="lineNum">     313 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     314 </span>            : 
<span class="lineNum">     315 </span><span class="lineNoCov">          0 : TEST(NodeTest, SpaceChar) {</span>
<span class="lineNum">     316 </span><span class="lineNoCov">          0 :   Node node = Node(' ');</span>
<span class="lineNum">     317 </span><span class="lineNoCov">          0 :   EXPECT_EQ(' ', node.as&lt;char&gt;());</span>
<a name="318"><span class="lineNum">     318 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     319 </span>            : 
<span class="lineNum">     320 </span><span class="lineNoCov">          0 : TEST(NodeTest, CloneNull) {</span>
<span class="lineNum">     321 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     322 </span><span class="lineNoCov">          0 :   Node clone = Clone(node);</span>
<span class="lineNum">     323 </span><span class="lineNoCov">          0 :   EXPECT_EQ(NodeType::Null, clone.Type());</span>
<a name="324"><span class="lineNum">     324 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     325 </span>            : 
<span class="lineNum">     326 </span><span class="lineNoCov">          0 : TEST(NodeTest, KeyNodeExitsScope) {</span>
<span class="lineNum">     327 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     328 </span>            :   {
<span class="lineNum">     329 </span><span class="lineNoCov">          0 :     Node temp(&quot;Hello, world&quot;);</span>
<span class="lineNum">     330 </span><span class="lineNoCov">          0 :     node[temp] = 0;</span>
<span class="lineNum">     331 </span>            :   }
<span class="lineNum">     332 </span><span class="lineNoCov">          0 :   for (Node::const_iterator it = node.begin(); it != node.end(); ++it) {</span>
<span class="lineNum">     333 </span>            :     (void)it;
<span class="lineNum">     334 </span>            :   }
<a name="335"><span class="lineNum">     335 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     336 </span>            : 
<span class="lineNum">     337 </span><span class="lineNoCov">          0 : TEST(NodeTest, DefaultNodeStyle) {</span>
<span class="lineNum">     338 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     339 </span><span class="lineNoCov">          0 :   EXPECT_EQ(EmitterStyle::Default, node.Style());</span>
<a name="340"><span class="lineNum">     340 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     341 </span>            : 
<span class="lineNum">     342 </span><span class="lineNoCov">          0 : TEST(NodeTest, AccessNonexistentKeyOnConstNode) {</span>
<span class="lineNum">     343 </span><span class="lineNoCov">          0 :   YAML::Node node;</span>
<span class="lineNum">     344 </span><span class="lineNoCov">          0 :   node[&quot;3&quot;] = &quot;4&quot;;</span>
<span class="lineNum">     345 </span><span class="lineNoCov">          0 :   const YAML::Node&amp; other = node;</span>
<span class="lineNum">     346 </span><span class="lineNoCov">          0 :   ASSERT_FALSE(other[&quot;5&quot;]);</span>
<a name="347"><span class="lineNum">     347 </span>            : }</a>
<span class="lineNum">     348 </span>            : 
<a name="349"><span class="lineNum">     349 </span><span class="lineNoCov">          0 : class NodeEmitterTest : public ::testing::Test {</span></a>
<span class="lineNum">     350 </span>            :  protected:
<span class="lineNum">     351 </span><span class="lineNoCov">          0 :   void ExpectOutput(const std::string&amp; output, const Node&amp; node) {</span>
<span class="lineNum">     352 </span><span class="lineNoCov">          0 :     Emitter emitter;</span>
<span class="lineNum">     353 </span><span class="lineNoCov">          0 :     emitter &lt;&lt; node;</span>
<span class="lineNum">     354 </span><span class="lineNoCov">          0 :     ASSERT_TRUE(emitter.good());</span>
<span class="lineNum">     355 </span><span class="lineNoCov">          0 :     EXPECT_EQ(output, emitter.c_str());</span>
<a name="356"><span class="lineNum">     356 </span>            :   }</a>
<span class="lineNum">     357 </span>            : 
<span class="lineNum">     358 </span><span class="lineNoCov">          0 :   void ExpectAnyOutput(const Node&amp; node, const std::string&amp; output1,</span>
<span class="lineNum">     359 </span>            :                        const std::string&amp; output2) {
<span class="lineNum">     360 </span><span class="lineNoCov">          0 :     Emitter emitter;</span>
<span class="lineNum">     361 </span><span class="lineNoCov">          0 :     emitter &lt;&lt; node;</span>
<span class="lineNum">     362 </span><span class="lineNoCov">          0 :     ASSERT_TRUE(emitter.good());</span>
<span class="lineNum">     363 </span><span class="lineNoCov">          0 :     EXPECT_THAT(emitter.c_str(), AnyOf(Eq(output1), Eq(output2)));</span>
<span class="lineNum">     364 </span>            :   }
<a name="365"><span class="lineNum">     365 </span>            : };</a>
<span class="lineNum">     366 </span>            : 
<span class="lineNum">     367 </span><span class="lineNoCov">          0 : TEST_F(NodeEmitterTest, SimpleFlowSeqNode) {</span>
<span class="lineNum">     368 </span><span class="lineNoCov">          0 :   Node node;</span>
<span class="lineNum">     369 </span><span class="lineNoCov">          0 :   node.SetStyle(EmitterStyle::Flow);</span>
<span class="lineNum">     370 </span><span class="lineNoCov">          0 :   node.push_back(1.01);</span>
<span class="lineNum">     371 </span><span class="lineNoCov">          0 :   node.push_back(2.01);</span>
<span class="lineNum">     372 </span><span class="lineNoCov">          0 :   node.push_back(3.01);</span>
<span class="lineNum">     373 </span>            : 
<span class="lineNum">     374 </span><span class="lineNoCov">          0 :   ExpectOutput(&quot;[1.01, 2.01, 3.01]&quot;, node);</span>
<a name="375"><span class="lineNum">     375 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     376 </span>            : 
<span class="lineNum">     377 </span><span class="lineNoCov">          0 : TEST_F(NodeEmitterTest, NestFlowSeqNode) {</span>
<span class="lineNum">     378 </span><span class="lineNoCov">          0 :   Node node, cell0, cell1;</span>
<span class="lineNum">     379 </span>            : 
<span class="lineNum">     380 </span><span class="lineNoCov">          0 :   cell0.push_back(1.01);</span>
<span class="lineNum">     381 </span><span class="lineNoCov">          0 :   cell0.push_back(2.01);</span>
<span class="lineNum">     382 </span><span class="lineNoCov">          0 :   cell0.push_back(3.01);</span>
<span class="lineNum">     383 </span>            : 
<span class="lineNum">     384 </span><span class="lineNoCov">          0 :   cell1.push_back(4.01);</span>
<span class="lineNum">     385 </span><span class="lineNoCov">          0 :   cell1.push_back(5.01);</span>
<span class="lineNum">     386 </span><span class="lineNoCov">          0 :   cell1.push_back(6.01);</span>
<span class="lineNum">     387 </span>            : 
<span class="lineNum">     388 </span><span class="lineNoCov">          0 :   node.SetStyle(EmitterStyle::Flow);</span>
<span class="lineNum">     389 </span><span class="lineNoCov">          0 :   node.push_back(cell0);</span>
<span class="lineNum">     390 </span><span class="lineNoCov">          0 :   node.push_back(cell1);</span>
<span class="lineNum">     391 </span>            : 
<span class="lineNum">     392 </span><span class="lineNoCov">          0 :   ExpectOutput(&quot;[[1.01, 2.01, 3.01], [4.01, 5.01, 6.01]]&quot;, node);</span>
<a name="393"><span class="lineNum">     393 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     394 </span>            : 
<span class="lineNum">     395 </span><span class="lineNoCov">          0 : TEST_F(NodeEmitterTest, MixBlockFlowSeqNode) {</span>
<span class="lineNum">     396 </span><span class="lineNoCov">          0 :   Node node, cell0, cell1;</span>
<span class="lineNum">     397 </span>            : 
<span class="lineNum">     398 </span><span class="lineNoCov">          0 :   cell0.SetStyle(EmitterStyle::Flow);</span>
<span class="lineNum">     399 </span><span class="lineNoCov">          0 :   cell0.push_back(1.01);</span>
<span class="lineNum">     400 </span><span class="lineNoCov">          0 :   cell0.push_back(2.01);</span>
<span class="lineNum">     401 </span><span class="lineNoCov">          0 :   cell0.push_back(3.01);</span>
<span class="lineNum">     402 </span>            : 
<span class="lineNum">     403 </span><span class="lineNoCov">          0 :   cell1.push_back(4.01);</span>
<span class="lineNum">     404 </span><span class="lineNoCov">          0 :   cell1.push_back(5.01);</span>
<span class="lineNum">     405 </span><span class="lineNoCov">          0 :   cell1.push_back(6.01);</span>
<span class="lineNum">     406 </span>            : 
<span class="lineNum">     407 </span><span class="lineNoCov">          0 :   node.SetStyle(EmitterStyle::Block);</span>
<span class="lineNum">     408 </span><span class="lineNoCov">          0 :   node.push_back(cell0);</span>
<span class="lineNum">     409 </span><span class="lineNoCov">          0 :   node.push_back(cell1);</span>
<span class="lineNum">     410 </span>            : 
<span class="lineNum">     411 </span><span class="lineNoCov">          0 :   ExpectOutput(&quot;- [1.01, 2.01, 3.01]\n-\n  - 4.01\n  - 5.01\n  - 6.01&quot;, node);</span>
<a name="412"><span class="lineNum">     412 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     413 </span>            : 
<span class="lineNum">     414 </span><span class="lineNoCov">          0 : TEST_F(NodeEmitterTest, NestBlockFlowMapListNode) {</span>
<span class="lineNum">     415 </span><span class="lineNoCov">          0 :   Node node, mapNode, blockNode;</span>
<span class="lineNum">     416 </span>            : 
<span class="lineNum">     417 </span><span class="lineNoCov">          0 :   node.push_back(1.01);</span>
<span class="lineNum">     418 </span><span class="lineNoCov">          0 :   node.push_back(2.01);</span>
<span class="lineNum">     419 </span><span class="lineNoCov">          0 :   node.push_back(3.01);</span>
<span class="lineNum">     420 </span>            : 
<span class="lineNum">     421 </span><span class="lineNoCov">          0 :   mapNode.SetStyle(EmitterStyle::Flow);</span>
<span class="lineNum">     422 </span><span class="lineNoCov">          0 :   mapNode[&quot;position&quot;] = node;</span>
<span class="lineNum">     423 </span>            : 
<span class="lineNum">     424 </span><span class="lineNoCov">          0 :   blockNode.push_back(1.01);</span>
<span class="lineNum">     425 </span><span class="lineNoCov">          0 :   blockNode.push_back(mapNode);</span>
<span class="lineNum">     426 </span>            : 
<span class="lineNum">     427 </span><span class="lineNoCov">          0 :   ExpectOutput(&quot;- 1.01\n- {position: [1.01, 2.01, 3.01]}&quot;, blockNode);</span>
<a name="428"><span class="lineNum">     428 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     429 </span>            : 
<span class="lineNum">     430 </span><span class="lineNoCov">          0 : TEST_F(NodeEmitterTest, NestBlockMixMapListNode) {</span>
<span class="lineNum">     431 </span><span class="lineNoCov">          0 :   Node node, mapNode, blockNode;</span>
<span class="lineNum">     432 </span>            : 
<span class="lineNum">     433 </span><span class="lineNoCov">          0 :   node.push_back(1.01);</span>
<span class="lineNum">     434 </span><span class="lineNoCov">          0 :   node.push_back(2.01);</span>
<span class="lineNum">     435 </span><span class="lineNoCov">          0 :   node.push_back(3.01);</span>
<span class="lineNum">     436 </span>            : 
<span class="lineNum">     437 </span><span class="lineNoCov">          0 :   mapNode.SetStyle(EmitterStyle::Flow);</span>
<span class="lineNum">     438 </span><span class="lineNoCov">          0 :   mapNode[&quot;position&quot;] = node;</span>
<span class="lineNum">     439 </span>            : 
<span class="lineNum">     440 </span><span class="lineNoCov">          0 :   blockNode[&quot;scalar&quot;] = 1.01;</span>
<span class="lineNum">     441 </span><span class="lineNoCov">          0 :   blockNode[&quot;object&quot;] = mapNode;</span>
<span class="lineNum">     442 </span>            : 
<span class="lineNum">     443 </span><span class="lineNoCov">          0 :   ExpectAnyOutput(blockNode,</span>
<span class="lineNum">     444 </span>            :                   &quot;scalar: 1.01\nobject: {position: [1.01, 2.01, 3.01]}&quot;,
<span class="lineNum">     445 </span><span class="lineNoCov">          0 :                   &quot;object: {position: [1.01, 2.01, 3.01]}\nscalar: 1.01&quot;);</span>
<a name="446"><span class="lineNum">     446 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     447 </span>            : 
<span class="lineNum">     448 </span><span class="lineNoCov">          0 : TEST_F(NodeEmitterTest, NestBlockMapListNode) {</span>
<span class="lineNum">     449 </span><span class="lineNoCov">          0 :   Node node, mapNode;</span>
<span class="lineNum">     450 </span>            : 
<span class="lineNum">     451 </span><span class="lineNoCov">          0 :   node.push_back(1.01);</span>
<span class="lineNum">     452 </span><span class="lineNoCov">          0 :   node.push_back(2.01);</span>
<span class="lineNum">     453 </span><span class="lineNoCov">          0 :   node.push_back(3.01);</span>
<span class="lineNum">     454 </span>            : 
<span class="lineNum">     455 </span><span class="lineNoCov">          0 :   mapNode.SetStyle(EmitterStyle::Block);</span>
<span class="lineNum">     456 </span><span class="lineNoCov">          0 :   mapNode[&quot;position&quot;] = node;</span>
<span class="lineNum">     457 </span>            : 
<span class="lineNum">     458 </span><span class="lineNoCov">          0 :   ExpectOutput(&quot;position:\n  - 1.01\n  - 2.01\n  - 3.01&quot;, mapNode);</span>
<a name="459"><span class="lineNum">     459 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     460 </span>            : 
<span class="lineNum">     461 </span><span class="lineNoCov">          0 : TEST_F(NodeEmitterTest, NestFlowMapListNode) {</span>
<span class="lineNum">     462 </span><span class="lineNoCov">          0 :   Node node, mapNode;</span>
<span class="lineNum">     463 </span>            : 
<span class="lineNum">     464 </span><span class="lineNoCov">          0 :   node.push_back(1.01);</span>
<span class="lineNum">     465 </span><span class="lineNoCov">          0 :   node.push_back(2.01);</span>
<span class="lineNum">     466 </span><span class="lineNoCov">          0 :   node.push_back(3.01);</span>
<span class="lineNum">     467 </span>            : 
<span class="lineNum">     468 </span><span class="lineNoCov">          0 :   mapNode.SetStyle(EmitterStyle::Flow);</span>
<span class="lineNum">     469 </span><span class="lineNoCov">          0 :   mapNode[&quot;position&quot;] = node;</span>
<span class="lineNum">     470 </span>            : 
<span class="lineNum">     471 </span><span class="lineNoCov">          0 :   ExpectOutput(&quot;{position: [1.01, 2.01, 3.01]}&quot;, mapNode);</span>
<a name="472"><span class="lineNum">     472 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     473 </span>            : }
<span class="lineNum">     474 </span><span class="lineNoCov">          0 : }</span>
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.11</a></td></tr>
  </table>
  <br>

</body>
</html>
